/*
 * Toedo
 * Copyright (C) 2009-2010 J. Devauchelle and contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 3 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package org.toedo.gui.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.toedo.gui.views.DashboardView;
import org.toedo.gui.views.DebugView;
import org.toedo.gui.views.WikiFormatingView;
import org.toedo.gui.views.NoteView;
import org.toedo.gui.views.NotesListView;
import org.toedo.gui.views.ProjectPropertiesView;
import org.toedo.gui.views.TaskListView;
import org.toedo.gui.views.TaskView;

public class MainPerspective implements IPerspectiveFactory {
	
	public static final String ID = "toedo-core.MainPerspective"; //$NON-NLS-1$

	public void createInitialLayout(IPageLayout layout) {
		layout.setEditorAreaVisible( false );
        layout.setFixed( false );
        
        IFolderLayout leftFolder = layout.createFolder( "leftFolder", IPageLayout.LEFT, 0.80f, layout.getEditorArea() ); //$NON-NLS-1$
        leftFolder.addView(DashboardView.ID);
        leftFolder.addView(TaskListView.ID);
        leftFolder.addView(NotesListView.ID);
        leftFolder.addPlaceholder(ProjectPropertiesView.ID);
        leftFolder.addPlaceholder(TaskView.ID + ":*"); //$NON-NLS-1$
        leftFolder.addPlaceholder(NoteView.ID + ":*"); //$NON-NLS-1$
        leftFolder.addPlaceholder(DebugView.ID);
        
        IFolderLayout rightFolder = layout.createFolder( "rightFolder", IPageLayout.RIGHT, 0.20f, layout.getEditorArea() ); //$NON-NLS-1$
        rightFolder.addView(WikiFormatingView.ID);
	}
}
